<?php
	$SITEROOT = '../../';
	require_once('../../assets/snippets/shoppingCart/kiwee.class.php');
    include_once "../includes/config.inc.php";
    include_once "../includes/controls/datagrid.class.php";
	include_once "../includes/lang/english.inc.php";

	$kiwee = new Kiwee();

	$oktxns = array();

	function db_getrows($qry) {
		$result = mysql_query($qry);
		if ($result === FALSE) return NULL;
		
		$ret = array();
		while ($row = mysql_fetch_assoc($result)) {
			$ret[] = $row;
		}
		
		mysql_free_result($result);
		return $ret;
	}

	$includes = scandir('ajaxprocs');
	foreach ($includes as $key => $value) {
		if (strstr($value, 'php') === FALSE) continue;
		include_once('ajaxprocs/' . $value);
	}

	$txn = $_POST['trxntype'];
	if (in_array($txn, $oktxns)) {
		$txn();
	}
?>
